$circle-size: .75rem;

$animation-time: .5s;
$curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);

// General classes
.wrapper {
    position: relative;
}

// Wizard
.wizard {
    &__header {
        position: relative;
    }

    &__step-title {
        transition: .5s transform;
        position: absolute;
        width: 100%;

        &.movingOutBackward {
            transform: translateX(100% * -1);
        }

        &.movingOutForward {
            transform: translateX(100%);
        }

        &.movingIn {
            transform: translateX(0);
        }
    }

    &__steps {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        transform: translateY(50%);
        z-index: 10;
    }

    &__title {
        padding-top: 1rem;
        margin-bottom: -2rem;
        position: relative;
        z-index: 1;

        &__text {
            display: flex;
            align-items: center;
            font-size: 1.375rem;
            font-weight: $font-weight-bold;
            margin: 1rem 0 .5rem 0;

            a {
                max-width: calc(100% - 2rem);
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
            }

            img {
                margin-right: .25rem;
            }
        }

        &__number {
            color: $gray-500;
        }
    }

    &__footer {
        text-align: right;

        .btn {
            margin-left: 1rem;
        }
    }
}

// Lines
.line {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    z-index: -1;
    height: 2px;
    transition: all $animation-time ease;

    &.-start {
        left: 0;
        background: $blue-400;
        width: 50%;
    }

    &.-end {
        left: 50%;
        background: $blue-400;
        width: 50%;
    }

    &.-background {
        background: $gray-200;
        width: 100%;
    }

    &.-overlay {
        background: $body-bg;
        width: $circle-size + .625rem;
        left: -5px;
    }

    &.-progress {
        background: $blue-500;
        width: 100%;
        transform: translateY(-50%) scaleX(0);
        transform-origin: left center;
    }

    &.-in-progress {
        transform: translateY(-50%) scaleX(1);
    }

    &.-tooltip-overlay {
        height: 12px;
        background-color: transparent;
        width: 100%;
    }
}

// Panels
.wizard__step-titles,
.panels {
    position: relative;
    overflow: hidden;
    margin: 0 -2rem;
}

.wizard__step-title,
.panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0 2rem;
    transition: .5s all;

    &.movingOutBackward {
        transform: translateX(100% * -1);
    }

    &.movingOutForward {
        transform: translateX(100%);
    }

    &.movingIn {
        transform: translateX(0);
    }
}

.panel {
    padding: 2rem;
}

// Steps
.steps {
    position: relative;
    display: flex;
    flex: 0 1 auto;
}

.step {
    flex-basis: 0;
    flex-grow: 1;
    text-align: center;

    &__content {
        position: relative;
        z-index: 2;
    }

    &__link {
        position: absolute;
        display: block;
        width: $circle-size + 0.3rem;
        height: $circle-size + 0.3rem;
        transform: translateX(-0.15rem) translateY(-0.15rem);

        z-index: 6;
        cursor: default;

        &:hover,
        &:active,
        &:focus {
            cursor: default;
        }
    }

    &__number {
        position: relative;
        background-color: transparent;
        font-weight: 800;
        width: $circle-size;
        height: $circle-size;
        line-height: $circle-size;
        margin: 0;
        border-radius: 50%;
        border: 2px solid $green-400;

        transition: opacity .5s;
        opacity: 1;
        z-index: 5;

        &::after {
            position: absolute;
            left: 50%;
            top: 50%;
            border-radius: 50%;
            display: block;
            content: '';
            width: 0;
            height: 0;
            background-color: $green-400;
            transform: translateX(-50%) translateY(-50%);
            transition: width .35s ease-in-out, height .35s ease-in-out;
        }

        &--blue {
            border-color: $blue-400;

            &::after {
                background-color: $blue-400;
            }
        }

        &--yellow {
            border-color: $yellow-400;

            &::after {
                background-color: $yellow-400;
            }
        }
    }

    &.-active {
        .step__number {
            border-width: 1px;

            &::after {
                width: $circle-size / 2;
                height: $circle-size / 2;
            }
        }
    }

    &.-completed {
        .step__number {
            &::after {
                width: $circle-size;
                height: $circle-size;
            }
        }

        .step__link {
            cursor: pointer;

            &:hover + .step__number:after {
                width: $circle-size + .25rem;
                height: $circle-size + .25rem;
            }
        }

        /*.checkmark {
            z-index: 0;
            animation: fill .4s ease-in-out forwards,
            scale .3s ease-in-out .6s both;
        }

        .checkmark__check {
            animation: stroke .5s linear .4s forwards;
        }*/

        .line {
            transform: translateY(-50%) scaleX(1);
        }
    }

    &:last-child {
        flex-grow: 0;
    }
}

/*
// Checkmark
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: $circle-size;
    height: $circle-size;
    border-radius: 50%;
    stroke-width: 2;
    stroke: $white;
    stroke-miterlimit: 10;
    box-shadow: inset 0 0 0 $blue-400;
    z-index: -1;
    transition: width .1s ease-in-out, height .1s ease-in-out, margin-left .1s ease-in-out, margin-top .1s ease-in-out;

    &__circle {
        stroke-dasharray: 166;
        stroke-dashoffset: 166;
        stroke-width: 4;
        stroke-miterlimit: 10;
        stroke: $blue-500;
        fill: none;
        animation: stroke .6s $curve forwards;
    }

    &__check {
        transform-origin: 50% 50%;
        stroke-dasharray: 40;
        stroke-dashoffset: 40;
        stroke: $white;
        stroke-width: 5;
    }
}

// Animations
@keyframes stroke {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    50% {
        transform: translateX(-50%) scale3d(1.5, 1.5, 1.5);
    }

    100% {
        transform: scale3d(0);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0 0 0 30px $blue-400;
    }
}

@keyframes gettingOut {
    0% {
        transform: translateY(0%);
    }

    30% {
        transform: translateY(100px);
    }

    100% {
        transform: translateY(-200%);
    }
}

@keyframes fadeIn {
    100% {
        opacity: 1;
    }
}*/